﻿using System.Collections.Generic;
using System;
using MathNet.Spatial.Euclidean;

namespace FDEE.Model
{
    public class BPE21 : RampBPTMBase
    {
        /// <summary>
        /// PTM1盖梁设置
        /// </summary>
        /// <param name="typeName"></param>
        /// <param name="pierNumber"></param>
        /// <param name="height"></param>
        /// <param name="width"></param>
        /// <param name="lwidth"></param>
        /// <param name="calculatedHeight"></param>
        /// <param name="L1"></param>
        /// <param name="L2"></param>
        /// <param name="span"></param>
        public BPE21(string typeName, string pierNumber,
            int height, int width, double lwidth, int length,
            int span) :
            base(typeName, pierNumber, height, width,lwidth, length,span)
        {
        }
        /// <summary>
        /// 配筋算量计算
        /// </summary>
        public override void SetRebarList()
        {
            RebarList = new RebarCollection();

            #region 全局变量
            int N11 = 9;
            int N12 = 9;
            int N21 = 8;
            int N22 = 2;
            int N3 = 2;
            int N41 = 72;
            int N42 = 36;
            //int N43 = 4;
            int N5 = 8;
            #endregion

            #region 1号钢筋

            int bb1 =(int)Width - 50 * 2;
            int cc1 = Height - 50*2-100-16;
            int aa1 = cc1;
            RebarList.Add(new MCRebarRecord(1, 1, "", eDB.DB28, aa1, bb1, cc1, N11, eShapeType.MCB));
            bb1 = (int)Width - 50 * 2-28*2;
            cc1 = Height - 50 * 2 - 100 - 16- 28;
            aa1 = cc1;
            RebarList.Add(new MCRebarRecord(1, 2, "", eDB.DB28, aa1, bb1, cc1, N12, eShapeType.MCB));
            //UboltList.UBoltNum[eDB.DB25] += 4 * N11 * 2;
            #endregion


            #region 2号钢筋
            int bb2 = (int)Width - 50 * 2;
            int cc2 = Height - 50 * 2  - 16*2;
            int aa2 = cc2;
            RebarList.Add(new MCRebarRecord(2, 1, "", eDB.DB20, aa2, bb2, cc2, N21, eShapeType.MCT));
             bb2 = (int)Width - 50 * 2;
            cc2 = Height - 50 - 150 - 16;
            aa2 = cc2;
            RebarList.Add(new MCRebarRecord(2, 2, "", eDB.DB20, aa2, bb2, cc2, N22, eShapeType.MCT));
            #endregion

            #region 3号钢筋
            int bb3 = (int)Width - 50 * 2-28*2*2;
            int cc3 = 500;
            int aa3 = cc3;
            RebarList.Add(new MCRebarRecord(3, 0, "", eDB.DB20, aa3, bb3, cc3, N3, eShapeType.MCT));
            #endregion

            #region 4#
            int N4A = Height-50*2-16*2;
            int N4B =130*2+28;
            RebarList.Add(new MORebarRecord(4, 1, "", eDB.DB16, N41, eShapeType.MO, N4A, N4B));
            //RebarList.Add(new MORebarRecord(4, 2, "", eDB.DB16, N42, eShapeType.MO, N4A, N4B));
            N4A = Height - 50 * 2 - 16 * 2;
            N4B = (int)Length - 50 * 2 - 2 * 16;
            RebarList.Add(new MORebarRecord(4, 2, "", eDB.DB16, N42, eShapeType.MO, N4A, N4B));
            #endregion

            #region 5# 
            int bb5 = (int)Length - 50 * 2 - 2 * 16;
            int cc5 = 600;
            int aa5 = cc5;
            RebarList.Add(new MCRebarRecord(5, 0, "", eDB.DB20, aa5, bb5, cc5, N5, eShapeType.MCR));
            #endregion

        }
        /// <summary>
        /// 预应力计算
        /// </summary>
        public override void SetTendonList()
        {
            TendonDistribute = new RebarTendonDistribute(320, new List<double>() {  });        
        }
    }
}
